//
//  BaseModel.h
//  JYShop
//
//  Created by 花花 on 2017/9/28.
//  Copyright © 2017年 花花. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface BaseModel : NSObject


@property(nonatomic,copy)NSString *id; //商品ID

@property(nonatomic,copy)NSString *name; //商品名称

@property(nonatomic,copy)NSString *description; //描述

@property(nonatomic,copy)NSString *image; //图片

@property(nonatomic,copy)NSString *unit; //单位

@property(nonatomic,assign)NSInteger label; //标签 1：热门、2：精品 3、新品

@property(nonatomic,copy)NSString *categoryName; //分类名称

@property(nonatomic,copy)NSString *originalPrice; //原价

//@property(nonatomic,assign)NSInteger price; //单价

@property(nonatomic,assign)NSInteger market; //市场价

@property(nonatomic,assign)NSInteger collect; //是否收藏

@property(nonatomic,assign)NSInteger goodsAmount;

//字典转模型
+ (instancetype)objectWithDic:(NSDictionary*)dic;

+ (NSArray*)objectsInArray:(NSArray<NSDictionary*>*)arr;

- (void)setValue:(id)value forUndefinedKey:(NSString *)key;
@end
